﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestUrlDecodeEncode.aspx.cs" Inherits="TestUtility_TestUrlDecodeEncode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function TestEncode() {
            var sAfterUrlEncode = encodeURIComponent(document.getElementById("BeforeUrlEncode").value);
            document.getElementById("AfterUrlEncode").value = sAfterUrlEncode;
            return false;
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        编码前的字符串：<asp:TextBox runat="server" ID="BeforeUrlEncode" style="width:5cm"></asp:TextBox><br />
        编码后的字符串：<asp:TextBox runat="server" ID="AfterUrlEncode" style="width:5cm"></asp:TextBox><br />

        解码前的字符串：<asp:TextBox runat="server" ID="BeforeUrlDecode" style="width:5cm"></asp:TextBox><br />
        解码后的字符串：<asp:TextBox runat="server" ID="AfterUrlDecode" style="width:5cm"></asp:TextBox><br />

        <asp:Button runat="server" Text="查看" ID="BtnEncode" OnClick="BtnEncode_Click" /><br />
        <input value="查看js编码" type="button" id="dddddddd" onclick="TestEncode();" />
    </div>
    </form>
</body>
</html>
